package com.psj.service.impl;

import com.psj.bean.User;
import com.psj.mapper.UserMapper;
import com.psj.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public User getByName(String username) {
        return userMapper.getByName(username);
    }

    @Override
    public void addUser(User userDB) {
        userMapper.addUser(userDB);
    }
}
